import 'package:flutter/material.dart';
import 'package:palmf_hid/common/middlewares/router_welcome.dart';
import 'package:palmf_hid/pages/login/login_binding.dart';
import 'package:palmf_hid/pages/login/login_view.dart';
import 'package:palmf_hid/pages/main/main_binding.dart';
import 'package:palmf_hid/pages/main/main_view.dart';
import 'package:get/get.dart';
import 'package:palmf_hid/pages/splash/splash_binding.dart';
import 'package:palmf_hid/pages/splash/splash_view.dart';
import 'routes.dart';

class AppPages {
  static const INITIAL = AppRoutes.INITIAL;
  static final RouteObserver<Route> observer = RouteObservers();
  static List<String> history = [];

  static final List<GetPage> routes = [
    // 免登陆
    ///启动页
    GetPage(
      name: AppRoutes.INITIAL,
      page: () => const SplashComponent(),
      binding: SplashBinding(),
      middlewares: [
        RouteWelcomeMiddleware(priority: 1),
      ],
    ),
    //主页
    GetPage(
      name: AppRoutes.MAIN,
      page: () => MainPage(),
      binding: MainBinding(),
    ),
    GetPage(
      name: AppRoutes.SIGN_IN,
      page: () => LoginPage(),
      binding: LoginBinding(),
    ),
  ];

// static final unknownRoute = GetPage(
//   name: AppRoutes.NotFound,
//   page: () => NotfoundView(),
// );
}
